﻿using Microsoft.Practices.Unity;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moop.Common;
using Moop.DataLayer.Olap.Service;

namespace Moop.DataLayer.Olap.Service.Test
{
    [TestClass]
    public class OlapDataServiceUnitTests
    {
        public string CONN_STRING   = @"Data Source=.;Catalog=Adventure Works DW 2008R2;";
        public string DATABASE_NAME = @"Adventure Works DW 2008R2";

        public OlapDataServiceUnitTests()
        {
            TypeContainer.Register();
        }

        [TestMethod]
        public void OlapMetaDataServiceTest()
        {            
            IOlapDataService olapDataService = TypeContainer.Instance.Resolve<IOlapDataService>();
            olapDataService.DastabaseName = DATABASE_NAME;
            olapDataService.OlapMetaDataService.ConnectionString = CONN_STRING;
            olapDataService.Init();

            olapDataService.Populate();
        }
    }
}

